// Hooks 

import React, { Component } from "react";
import Count from "./components/Count";
export default class App extends Component {
  state = {
    isSow: true,
    count: 99,
  };
  render() {
    return (
      <div>
        {this.state.isSow && <Count num={this.state.count}></Count>}
        <button
          onClick={() => {
            this.setState({ isSow: false });
          }}
        >模拟卸载count</button>
        <button onClick={
          () => {
            this.setState({
              count:this.state.count-10
            })
          }
        }>app_count减少</button>
      </div>
    );
  }
}
